<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/jsp/manage/common/taglibs.jsp" %>
<script type="text/javascript">
    $(function () {
        /*$("#manage_electrictyMeterups_datagrid").treegrid({

        });*/
        $.acooly.framework.registerKeydown('manage_electrictyMeterups_from', 'manage_electrictyMeterups_datagrid');
    });
    function electrictyMeterups_t(value,row) {
        if(value){
            return value;
        }else {
            return '';
        }
        if(value=='true'){
            return '<i class="fa fa-check fa-lg fa-fw fa-col" style="color: green"></i>'
        }else{
            return '<i class="fa fa-times fa-lg fa-fw fa-col" style="color: red"></i>'
        }
    }
    function electrictyMeterups_tw(value,row) {
        if(value){
            return value+" (w)";
        }else {
            return '';
        }
    }
    function electrictyMeter_ups(value,row) {
        var type=$("#manage_electrictyMeterups_from [name='type']").val();
        var str="'ffffff100000f109'";
        $.acooly.framework.show('/manage/demo/report/listAll.html?eId=9&eqid='+str+'&createTime='+value+'&type='+type,1300,500);
        //$.acooly.framework.show('/manage/demo/report/listAll.html?eId=ffffff100000f109&createTime='+value+"&type="+type,1300,500);
    }
    function equipentAllZ_ups(value,row) {
        return '   <a onclick=" electrictyMeter_ups(\''+row.createTime+'\') " href="#" title="查看"><i class="fa fa-file-o fa-lg fa-fw fa-col"></i></a>';
    }
</script>
<div class="easyui-layout" data-options="fit : true,border : false">
    <!-- 查询条件 -->
    <div data-options="region:'north',border:false" style="padding:5px; overflow: hidden;" align="left">
        <form id="manage_electrictyMeterups_from">
            <table class="tableForm" width="100%">
                <tr>
                    <td align="left">
                        <div>
                            <span>类型：</span>
                            <select name="type" editable="false" style="height:27px;width: 150px" panelHeight="auto" class="easyui-combobox" id="nyr_sdups">
                                <option value="1">日报</option>
                                <option value="2">月报</option>
                                <option value="3">年报</option>
                            </select>
                            <span class="div_outter_text">
                                <input  name="begin" type="text" onFocus="WdatePicker({readOnly:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="line-height:28px;
                                       border-radius: 5px; border:1px #95B8E7 solid; width:146px; vertical-align: middle;" placeholder="开始时间" prompt="限办时间(开始)"/>
                            </span>
                            <span class="div_outter_text">
                                <input  name="end" type="text" onFocus="WdatePicker({readOnly:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="line-height: 28px;
                                    border-radius: 5px; border:1px #95B8E7 solid; width:146px; vertical-align: middle;" placeholder="结束时间" prompt="限办时间(结束)" />
                            </span>
                            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:false" onclick="$.acooly.framework.search('manage_electrictyMeterups_from','manage_electrictyMeterups_datagrid');"><i class="fa fa-search fa-lg fa-fw fa-col"></i>查询</a>
                            <a href="#" class="easyui-linkbutton" iconCls="icon-excel" plain="false"
                               onclick="$.lora.common.commonExportReport('manage_electrictyMeterups_datagrid','ups电量仪')">导出</a>
                        </div>
                    </td>
                </tr>
            </table>
        </form>
    </div>

    <div data-options="region:'center',border:false">
        <table id="manage_electrictyMeterups_datagrid" class="easyui-datagrid" url="/manage/demo/report/electricityMeterreport.html?eid=ffffff100000f108" toolbar="#manage_electrictyMeterups_toolbar" fit="true" border="false" fitColumns="false"
               checkOnSelect="true" selectOnCheck="true" singleSelect="true">
            <thead>
            <tr>
                <th align="center" colspan="12">ups电量仪</th>
            </tr>
                <tr>
                    <th field="rowActions" data-options="formatter:function(value, row, index){return equipentAllZ_ups(value,row)}">动作</th>
                    <th field="createTime" align="center"  width="100">记录时间</th>
                    <th field="aVoltage" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }" >A相电压</th>
                    <th field="bVoltage" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">B相电压</th>
                    <th field="cVoltage" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">C相电压</th>
                    <th field="aCurrent" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">A相电流</th>
                    <th field="bCurrent" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">B相电流</th>
                    <th field="cCurrent" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">C相电流</th>
                    <th field="aAvailablePower" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_tw(value,row) }">A相有功功率</th>
                    <th field="bAvailablePower" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_tw(value,row) }">B相有功功率</th>
                    <th field="cAvailablePower" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_tw(value,row) }">C相有功功率</th>
                    <th field="rate" align="center" data-options="formatter:function(value, row, index){ return electrictyMeterups_t(value,row) }">频率</th>
                </tr>
            </thead>
        </table>
        <div id="manage_electrictyMeterups_toolbar">

        </div>
    </div>
</div>
